package com.jackeys.piaems.util;

import lombok.Getter;

/**
 * @ClassName: StatusEnumUtil
 * @Description: 状态码类
 * @Author: Jackeys
 * @Date: 2021-06-11 13:36
 * @Version: 1.0
 */

@Getter
public enum StatusEnumUtil {
    /**
     * 成功类状态码
     */
    SUCCESS(100, "成功"),
    GET_USER_SUCCESS(101, "获取用户成功"),
    USER_LOGIN_SUCCESS(102, "登陆成功"),
    USER_REGISTER_SUCCESS(103,"注册成功"),
    USER_FORGET_PASSWORD_SUCCESS(104,"找回密码成功"),
    USER_UPLOAD_HEAD_PORTRAIT_SUCCESS(105,"上传头像成功"),
    USER_UPDATE_INF_SUCCESS(106,"修改信息成功"),
    USER_GET_HEAD_PORTRAIT_SUCCESS(107,"查询头像成功"),

    CATEGORY_GET_SUCCESS(108,"查询类别成功"),

    PAYMENT_ADD_SUCCESS(109,"添加账单成功"),
    PAYMENT_DELETE_SUCCESS(110,"删除账单成功"),
    PAYMENT_UPDATE_SUCCESS(111,"修改账单成功"),
    PAYMENT_QUERY_BY_DATE_SUCCESS(112,"查询账单成功"),
    PAYMENT_QUERY_TOTAL_SUCCESS(113,"查询总账单成功"),
    PAYMENT_QUERY_IN_AND_OUT_SUCCESS(114,"查询支出与收入的总和成功"),
    PAYMENT_QUERY_ALL_SUCCESS(115,"查询所有账单成功"),

    IMAGE_GET_SUCCESS(116,"入侵检测图片获取成功"),
    IMAGE_GET_CNT_SUCCESS(117,"入侵检测图片数量获取成功"),
    IMAGE_GET_PAGE_QUERY_SUCCESS(118,"按照条件分页查询图片成功"),

    SECURITY_CODE_SEND_SUCCESS(301,"验证码发送成功"),

    /**
     * 失败类状态码
     */
    FAIL(200, "失败"),
    GET_USER_FAIL(201, "获取用户失败"),
    USER_LOGIN_FAIL(202, "登陆失败，账号或密码错误"),
    USER_REGISTER_FAIL(203,"注册失败"),
    USER_REGISTER_EMAIL_CONFLICT(204,"注册失败，邮箱已被注册"),
    USER_REGISTER_SECURITY_CODE_ERROR(205,"注册失败，验证码错误"),
    USER_FORGET_PASSWORD_FAIL(206,"找回密码失败"),
    USER_FORGET_SECURITY_CODE_ERROR(207,"找回密码失败，验证码错误"),
    USER_UPLOAD_HEAD_PORTRAIT_FAIL(208,"上传头像失败"),
    USER_UPDATE_INF_FAIL(209,"修改信息失败"),
    USER_GET_HEAD_PORTRAIT_FAIL(210,"查询头像失败"),

    CATEGORY_GET_FAIL(211,"查询类别失败"),

    PAYMENT_ADD_FAIL(212,"添加账单失败"),
    PAYMENT_DELETE_FAIL(213,"删除账单失败"),
    PAYMENT_UPDATE_FAIL(214,"修改账单失败"),
    PAYMENT_QUERY_BY_DATE_FAIL(215,"查询账单失败"),
    PAYMENT_QUERY_TOTAL_FAIL(216,"查询总账单失败"),
    PAYMENT_QUERY_IN_AND_OUT_FAIL(217,"查询支出与收入的总和失败"),
    PAYMENT_QUERY_ALL_FAIL(218,"查询所有账单失败"),

    IMAGE_GET_FAIL(219,"入侵检测图片获取失败"),
    IMAGE_GET_CNT_FAIL(220,"入侵检测图片数量获取失败"),
    IMAGE_GET_PAGE_QUERY_FAIL(221,"按照条件分页查询图片失败"),

    SECURITY_CODE_SEND_FAIL(401,"验证码发送失败"),
    JWT_TOKEN_FAIl(402,"登录失效，请重新登录"),

    ;
    //状态码
    private Integer code;
    //状态信息
    private String msg;

    StatusEnumUtil(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
    }
